package com.zgkxzx.设计模式.单例;

/**
 * 创建者   zgkxzx
 * 创建日期 2018/5/10.
 * 功能描述 懒汉式
 */
public class SingleInstance {

    private static SingleInstance singleInstance;

    private SingleInstance() {

    }

    public static SingleInstance getInstance() {
        if (singleInstance == null)
            singleInstance = new SingleInstance();
        return singleInstance;
    }
}
